var userModel = {
  login: function(data, result, fail){
    var url = '/admin/account/login';
    $.post(url, data, result).fail(fail);
  },
  setProfile: function(data, result, fail){
    var url = '/admin/profile/set-profile';
    $.post(url, data, result).fail(fail);
  },
  changePwd: function(data, result, fail){
    var url = '/admin/profile/changepwd';
    $.post(url, data, result).fail(fail);
  },
  getPageList: function(data, result, fail){
    var url = '/admin/user/page-list';
    $.get(url, data, result).fail(fail);
  },
  uploadExcelFile: function(data, result, fail){
    $.ajax('/admin/user/upload-excel-file', {
      type: "post",
      data: data,
      dataType: 'json',
      processData: false,
      contentType: false,
      success: result,
      error: fail
    });
  },
  getinfo: function(data, result, fail){
    var url = '/admin/user/info';
    $.get(url, data, result).fail(fail);
  },
  create: function(data, result, fail){
    var url = '/admin/user/insert';
    $.post(url, data, result).fail(fail);
  },
  update: function(data, result, fail){
    var url = '/admin/user/update';
    $.post(url, data, result).fail(fail);
  },
  delete: function(data, result, fail){
    var url = '/admin/user/delete';
    $.post(url, data, result).fail(fail);
  }
};